<template>
	<view class="bid-form-container">
		<!-- 状态栏占位 -->
		<view class="status-bar"></view>
		
		<!-- 顶部导航栏 -->
		<view class="navbar">
			<view class="back-btn" @tap="goBack">
				<image class="back-icon" src="/static/icons/arrow_left.png"></image>
			</view>
			<text class="page-title">提交投标</text>
		</view>
		
		<!-- 表单内容 -->
		<scroll-view class="form-scroll" scroll-y>
			<!-- 项目信息摘要 -->
			<view class="project-summary">
				<text class="project-title">{{ project.title }}</text>
				<view class="project-meta">
					<text class="meta-item">预算: ￥{{ project.budget }}{{ project.budgetUnit }}</text>
					<text class="meta-divider">|</text>
					<text class="meta-item">截止: {{ project.deadline }}</text>
				</view>
			</view>
			
			<!-- 投标表单 -->
			<view class="form-card">
				<view class="form-section">
					<text class="section-title">报价信息</text>
					
					<view class="form-item">
						<text class="form-label">投标报价 <text class="required">*</text></text>
						<view class="price-input-container">
							<text class="currency-symbol">￥</text>
							<input 
								class="price-input" 
								type="digit" 
								v-model="formData.price" 
								placeholder="请输入投标报价"
							/>
							<picker 
								class="unit-picker" 
								mode="selector" 
								:range="priceUnits" 
								@change="onUnitChange"
							>
								<view class="unit-text">{{ formData.priceUnit }}</view>
								<image class="dropdown-icon" src="/static/icons/chevron-down.png"></image>
							</picker>
						</view>
					</view>
					
					<view class="form-item">
						<text class="form-label">服务周期 <text class="required">*</text></text>
						<view class="duration-input-container">
							<input 
								class="duration-input" 
								type="number" 
								v-model="formData.duration" 
								placeholder="请输入服务周期"
							/>
							<picker 
								class="duration-picker" 
								mode="selector" 
								:range="durationUnits" 
								@change="onDurationUnitChange"
							>
								<view class="unit-text">{{ formData.durationUnit }}</view>
								<image class="dropdown-icon" src="/static/icons/chevron-down.png"></image>
							</picker>
						</view>
					</view>
				</view>
				
				<view class="form-section">
					<text class="section-title">技术方案</text>
					
					<view class="form-item">
						<text class="form-label">技术方案描述 <text class="required">*</text></text>
						<textarea 
							class="form-textarea" 
							v-model="formData.technicalDescription" 
							placeholder="请详细描述您的技术方案、实施计划、项目团队等信息..." 
							maxlength="1000"
						/>
						<text class="text-counter">{{ formData.technicalDescription.length }}/1000</text>
					</view>
					
					<view class="form-item">
						<text class="form-label">技术优势</text>
						<textarea 
							class="form-textarea" 
							v-model="formData.advantages" 
							placeholder="请描述您的方案相比其他竞标者的优势..." 
							maxlength="500"
						/>
						<text class="text-counter">{{ formData.advantages.length }}/500</text>
					</view>
				</view>
				
				<view class="form-section">
					<text class="section-title">资质证明</text>
					
					<view class="form-item">
						<text class="form-label">企业资质 <text class="required">*</text></text>
						<view class="qualification-list">
							<view class="qualification-item" v-for="(qual, index) in formData.qualifications" :key="index">
								<view class="qual-info">
									<image class="qual-icon" :src="getFileIcon(qual.type)"></image>
									<view class="qual-content">
										<text class="qual-name">{{ qual.name }}</text>
										<text class="qual-size">{{ qual.size }}</text>
									</view>
								</view>
								<view class="delete-btn" @tap="deleteQualification(index)">
									<image class="delete-icon" src="/static/icons/trash.png"></image>
								</view>
							</view>
							<image class="upload-icon" src="/static/icons/upload.png"></image>
							<text>上传资质文件</text>
							<uni-file-picker
							  v-model="imageValue"
							  @select="handleSelect"
							  @progress="handleProgress"
							  @success="handleSuccess"
							  @fail="handleFail"
							></uni-file-picker>
							<!-- <button class="upload-btn" @tap="chooseQualificationFile">
								<image class="upload-icon" src="/static/icons/upload.png"></image>
								<text>上传资质文件</text>
							</button> -->
						</view>
					</view>
				</view>
				
				<view class="form-section">
					<text class="section-title">联系信息</text>
					
					<view class="form-item">
						<text class="form-label">联系人 <text class="required">*</text></text>
						<input 
							class="form-input" 
							type="text" 
							v-model="formData.contactName" 
							placeholder="请输入联系人姓名"
						/>
					</view>
					
					<view class="form-item">
						<text class="form-label">联系电话 <text class="required">*</text></text>
						<input 
							class="form-input" 
							type="number" 
							v-model="formData.contactPhone" 
							placeholder="请输入联系电话"
							maxlength="11"
						/>
					</view>
					
					<view class="form-item">
						<text class="form-label">电子邮箱</text>
						<input 
							class="form-input" 
							type="text" 
							v-model="formData.contactEmail" 
							placeholder="请输入电子邮箱"
						/>
					</view>
				</view>
				
				<view class="form-section">
					<text class="section-title">其他信息</text>
					
					<view class="form-item">
						<text class="form-label">补充说明</text>
						<textarea 
							class="form-textarea" 
							v-model="formData.additionalInfo" 
							placeholder="请输入其他需要补充的信息..." 
							maxlength="500"
						/>
						<text class="text-counter">{{ formData.additionalInfo.length }}/500</text>
					</view>
				</view>
				
				<view class="agreement-box">
					<checkbox 
						:checked="formData.agreeTerms" 
						@tap="formData.agreeTerms = !formData.agreeTerms" 
						color="#1d4ed8"
					/>
					<text class="agreement-text">
						我已阅读并同意
						<text class="link-text" @tap="showTerms">《投标规则》</text>
						和
						<text class="link-text" @tap="showPrivacy">《隐私政策》</text>
					</text>
				</view>
			</view>
		</scroll-view>
		
		<!-- 底部操作栏 -->
		<view class="bottom-bar">
			<button class="save-draft-btn" @tap="saveDraft">保存草稿</button>
			<!-- <button class="submit-btn" @tap="submitBid" :disabled="!formValid">提交投标</button> -->
			<button class="submit-btn" @tap="submitBid">提交投标</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imageValue :[],
				uploadTask : null,
				 imgs: [],         // 存储上传成功的图片URL
				projectId: null,
				project: {
					id: 101,
					title: '智能制造设备采购项目',
					budget: '680',
					budgetUnit: '万',
					deadline: '2023-06-18',
				},
				priceUnits: ['元', '千元', '万元', '百万'],
				durationUnits: ['天', '周', '月', '年'],
				formData: {
					price: '',
					priceUnit: '万元',
					duration: '',
					durationUnit: '天',
					technicalDescription: '',
					advantages: '',
					qualifications: [],
					contactName: '',
					contactPhone: '',
					contactEmail: '',
					additionalInfo: '',
					agreeTerms: false
				}
			}
		},
		computed: {
			formValid() {
				return this.formData.price &&
					this.formData.duration &&
					this.formData.technicalDescription &&
					this.formData.qualifications.length > 0 &&
					this.formData.contactName &&
					this.formData.contactPhone &&
					this.formData.agreeTerms;
			}
		},
		onLoad(options) {
			if (options.projectId) {
				this.projectId = options.projectId;
				// 在实际项目中，这里应该调用接口获取项目详情
				// this.getProjectDetail(this.projectId);
				
				// 尝试加载草稿
				this.loadDraft();
			}
			
			// 预填用户信息
			const userInfo = uni.getStorageSync('userInfo');
			if (userInfo) {
				this.formData.contactName = userInfo.realName || '';
				// 其他信息可以在这里预填
			}
		},
		methods: {
			goBack() {
				uni.navigateBack();
			},
			onUnitChange(e) {
				const index = e.detail.value;
				this.formData.priceUnit = this.priceUnits[index];
			},
			onDurationUnitChange(e) {
				const index = e.detail.value;
				this.formData.durationUnit = this.durationUnits[index];
			},
			getFileIcon(type) {
				const iconMap = {
					pdf: '/static/icons/file-pdf.png',
					word: '/static/icons/file-word.png',
					excel: '/static/icons/file-excel.png',
					image: '/static/icons/file-image.png',
					zip: '/static/icons/file-zip.png',
					default: '/static/icons/file.png'
				};
				
				return iconMap[type] || iconMap.default;
			},
			// 处理文件选择
			handleSelect(e) {
			  try {
			    // 获取文件对象
			    const file = e.tempFiles[0]
			    if (!file) {
			      uni.showToast({ title: '未选择文件', icon: 'none' })
			      return
			    }
			
			    // 处理安卓 content:// 路径
			    // #ifdef APP-PLUS
			    const realPath = file.path.startsWith('content://') ? 
			       convertContentUri(file.path) : 
			      file.path
			    // #endif
			    // #ifndef APP-PLUS
			    const realPath = file.path
			    // #endif
			    
				
				
			    // 执行上传
			    this.uploadTask = uni.uploadFile({
			      url: "http://115.190.38.218/go/api/v1/upload", // 补全API路径
			      filePath: realPath,
			      name: 'file',
			      formData: {
			        // userId: info.value.id_card,
			        category: 'documents'
			      },
			      header: {
			        'Authorization': 'Bearer your_token',
			        'X-Custom-Header': 'value'
			      },
			      success: (res) => {
			        console.log('原始响应:', res)
			        try {
			          const data = JSON.parse(res.data)
			          console.log('上传成功:', data)
					  this.imgs.push(data.data.url)
					  
			          uni.showToast({ title: '上传成功' })
			        } catch (e) {
			          console.error('JSON解析失败:', e)
			        }
			      }
			    })
			  } catch (err) {
			    console.error('选择文件错误:', err)
			  }
			},
			// Android路径转换方法
			// #ifdef APP-PLUS
			convertContentUri (uri) {
			  return new Promise((resolve) => {
			    plus.io.resolveLocalFileSystemURL(
			      uri,
			      (entry) => resolve(entry.toLocalURL()),
			      (e) => {
			        console.error('路径转换失败:', e.message)
			        resolve(uri) // 降级处理
			      }
			    )
			  })
			}
			// #endif
			,
			// 其他处理函数
			handleProgress  (e) {
			  console.log(`上传进度：${e.progress}%`)
			  // 可以在此显示进度条
			}
			,
			handleSuccess (e) {
			  // 组件自带的上传成功回调（如果你配置了autoUpload）
			}
			,
			 handleFail  (err) {
			  console.error('失败原因:', err.errMsg)
			  uni.showToast({ title: `上传失败：${err.errMsg}`, icon: 'none' })
			}
			,
			// 取消上传（可选）
			cancelUpload () {
			  if (uploadTask.value) {
			    uploadTask.value.abort()
			    uni.showToast({ title: '已取消上传', icon: 'none' })
			  }
			},
			chooseQualificationFile() {
				
				// #ifdef APP-PLUS
				const Intent = plus.android.importClass('android.content.Intent')
				const activity = plus.android.runtimeMainActivity()
				
				const intent = new Intent(Intent.ACTION_GET_CONTENT)
				intent.setType('*/*') // 所有文件类型
				console.log('没结果！！！！111：')
				intent.addCategory(Intent.CATEGORY_OPENABLE)
				intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) // 关键：确保新任务栈
				console.log('没结果！！！！2222：')
				activity.startActivityForResult(intent, 100, (result) => {
					console.log('没结果！！！！：',result)
				  if (result.data) {
				    const uri = result.data.getData()
				    const filePath = plus.android.invoke(uri, 'getPath')
				    console.log('选中文件路径：', filePath)
				  }else{
					   console.log('没结果！！！！：')
				  }
				})
				// #endif
				// uni.chooseFile({
				// 	count: 1,
				// 	extension: ['.pdf', '.doc', '.docx', '.jpg', '.png'],
				// 	success: (res) => {
				// 		const file = res.tempFiles[0];
				// 		// 获取文件类型
				// 		const fileExt = file.name.split('.').pop().toLowerCase();
				// 		let fileType = 'default';
						
				// 		if (fileExt === 'pdf') {
				// 			fileType = 'pdf';
				// 		} else if (['doc', 'docx'].includes(fileExt)) {
				// 			fileType = 'word';
				// 		} else if (['jpg', 'jpeg', 'png'].includes(fileExt)) {
				// 			fileType = 'image';
				// 		} else if (['xls', 'xlsx'].includes(fileExt)) {
				// 			fileType = 'excel';
				// 		} else if (['zip', 'rar'].includes(fileExt)) {
				// 			fileType = 'zip';
				// 		}
						
				// 		// 格式化文件大小
				// 		const fileSizeKB = file.size / 1024;
				// 		let fileSize = '';
						
				// 		if (fileSizeKB < 1024) {
				// 			fileSize = fileSizeKB.toFixed(2) + 'KB';
				// 		} else {
				// 			fileSize = (fileSizeKB / 1024).toFixed(2) + 'MB';
				// 		}
						
				// 		// 添加到资质列表
				// 		this.formData.qualifications.push({
				// 			name: file.name,
				// 			size: fileSize,
				// 			type: fileType,
				// 			path: file.path
				// 		});
				// 	}
				// });
			},
			deleteQualification(index) {
				this.formData.qualifications.splice(index, 1);
			},
			showTerms() {
				uni.showToast({
					title: '投标规则功能开发中',
					icon: 'none'
				});
			},
			showPrivacy() {
				uni.showToast({
					title: '隐私政策功能开发中',
					icon: 'none'
				});
			},
			validateForm() {
				if (!this.formData.price) {
					uni.showToast({
						title: '请输入投标报价',
						icon: 'none'
					});
					return false;
				}
				
				if (!this.formData.duration) {
					uni.showToast({
						title: '请输入服务周期',
						icon: 'none'
					});
					return false;
				}
				
				if (!this.formData.technicalDescription) {
					uni.showToast({
						title: '请输入技术方案描述',
						icon: 'none'
					});
					return false;
				}
				
				// if (this.formData.qualifications.length === 0) {
				// 	uni.showToast({
				// 		title: '请上传资质证明文件',
				// 		icon: 'none'
				// 	});
				// 	return false;
				// }
				
				if (!this.formData.contactName) {
					uni.showToast({
						title: '请输入联系人姓名',
						icon: 'none'
					});
					return false;
				}
				
				if (!this.formData.contactPhone) {
					uni.showToast({
						title: '请输入联系电话',
						icon: 'none'
					});
					return false;
				}
				
				if (this.formData.contactPhone && !/^1\d{10}$/.test(this.formData.contactPhone)) {
					uni.showToast({
						title: '联系电话格式不正确',
						icon: 'none'
					});
					return false;
				}
				
				if (this.formData.contactEmail && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(this.formData.contactEmail)) {
					uni.showToast({
						title: '电子邮箱格式不正确',
						icon: 'none'
					});
					return false;
				}
				
				if (!this.formData.agreeTerms) {
					uni.showToast({
						title: '请阅读并同意投标规则和隐私政策',
						icon: 'none'
					});
					return false;
				}
				
				return true;
			},
			saveDraft() {
				// 保存草稿到本地存储
				try {
					uni.setStorageSync(`bid_draft_${this.projectId}`, JSON.stringify(this.formData));
					uni.showToast({
						title: '草稿保存成功',
						icon: 'success'
					});
				} catch (e) {
					uni.showToast({
						title: '草稿保存失败',
						icon: 'none'
					});
					console.error('保存草稿失败', e);
				}
			},
			loadDraft() {
				// 从本地存储加载草稿
				try {
					const draftData = uni.getStorageSync(`bid_draft_${this.projectId}`);
					if (draftData) {
						const draft = JSON.parse(draftData);
						// 合并草稿数据与默认数据
						this.formData = Object.assign({}, this.formData, draft);
						
						uni.showToast({
							title: '已加载草稿',
							icon: 'success'
						});
					}
				} catch (e) {
					console.error('加载草稿失败', e);
				}
			},
			submitBid() {
				const token = uni.getStorageSync("token")
				const userid = uni.getStorageSync("info")
				console.log("userid:",userid.id_card)
				if (!this.validateForm()) {
					return;
				}
				
				// 显示加载提示
				// uni.showLoading({
				// 	title: '提交中...'
				// });
				console.log("图片数组,有哪些图片？：",this.imgs)
				uni.request({
					url:'http://115.190.38.218/go/api/v1/bids',
					method:'POST',	
					header: { 'Content-Type': 'application/json' ,
					  'Authorization': `Bearer ${token}` // 关键！格式必须为 "Bearer {token}"
					},
					data:{
						project_id:this.project.id,
						user_id:userid.id_card,
						price:parseFloat(this.project.budget) ,
						duration:parseInt(this.project.deadline) ,
						description:this.formData.technicalDescription,
						project_title:this.project.title,
						username:this.formData.contactName,
						company_name:'',
						images:this.imgs,
						
						
					},
					success:function(res){
						console.log("请求结果：",res)
						if(200 < res.statusCode && res.statusCode < 300){
							uni.removeStorageSync(`bid_draft_${this.projectId}`);
							uni.showModal({
								title: '投标成功',
								content: '您的投标已成功提交，我们将尽快审核您的投标并与您联系。',
								showCancel: false,
								success: () => {
									// 返回上一页
									uni.navigateBack();
								}
							});
						}else if(400 <= res.statusCode && res.statusCode <= 500){
							console.log("投标失败：",res.data.error)
							if(res.data.error == "无效令牌"){
							uni.showToast({
								title: '登录过期',
								duration: 2000
							});	
							
							uni.navigateTo({
								url: `/pages/login/login`
							});
							}else{
								uni.showToast({
									title: '你已投过这个项目',
									duration: 2000
								});
							}
							

						}
						//uni.hideLoading();
						// 清除草稿
						
					},
					fail:function(err){
						console.log("请求失败！",err)
						// if(){
							
						// }
						// uni.showToast({
							
						// })
					}
				})
				// 模拟提交请求
				// setTimeout(() => {
					
					
					
					
				// 	// 显示成功提示
					
				// }, 2000);
			}
		}
	}
</script>

<style>
	.bid-form-container {
		position: relative;
		min-height: 100vh;
		background-color: #f5f7fa;
		display: flex;
		flex-direction: column;
	}
	
	.status-bar {
		height: var(--status-bar-height);
		width: 100%;
		background-color: #fff;
	}
	
	.navbar {
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		height: 100rpx;
		background-color: #fff;
		border-bottom: 1px solid #f0f0f0;
	}
	
	.back-btn {
		width: 80rpx;
		height: 80rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.back-icon {
		width: 40rpx;
		height: 40rpx;
	}
	
	.page-title {
		flex: 1;
		text-align: center;
		font-size: 36rpx;
		font-weight: 600;
		color: #333;
		margin-right: 80rpx;
	}
	
	.form-scroll {
		flex: 1;
		padding-bottom: 120rpx;
	}
	
	.project-summary {
		background-color: #1d4ed8;
		padding: 40rpx 30rpx;
		color: #fff;
	}
	
	.project-title {
		font-size: 32rpx;
		font-weight: 600;
		margin-bottom: 16rpx;
		line-height: 1.4;
	}
	
	.project-meta {
		display: flex;
		align-items: center;
		font-size: 26rpx;
		color: rgba(255, 255, 255, 0.8);
	}
	
	.meta-divider {
		margin: 0 16rpx;
	}
	
	.form-card {
		background-color: #fff;
		border-radius: 16rpx 16rpx 0 0;
		margin-top: -16rpx;
		padding: 40rpx 30rpx;
	}
	
	.form-section {
		margin-bottom: 40rpx;
	}
	
	.section-title {
		font-size: 32rpx;
		font-weight: 600;
		color: #333;
		margin-bottom: 30rpx;
		position: relative;
		padding-left: 20rpx;
	}
	
	.section-title::before {
		content: '';
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 8rpx;
		height: 32rpx;
		background-color: #1d4ed8;
		border-radius: 4rpx;
	}
	
	.form-item {
		margin-bottom: 30rpx;
	}
	
	.form-label {
		font-size: 28rpx;
		color: #333;
		margin-bottom: 16rpx;
		display: block;
	}
	
	.required {
		color: #ef4444;
		margin-left: 4rpx;
	}
	
	.form-input {
		width: 100%;
		height: 90rpx;
		background-color: #f9fafb;
		border: 1px solid #e5e7eb;
		border-radius: 12rpx;
		padding: 0 24rpx;
		font-size: 28rpx;
		color: #333;
	}
	
	.price-input-container {
		display: flex;
		align-items: center;
		background-color: #f9fafb;
		border: 1px solid #e5e7eb;
		border-radius: 12rpx;
		height: 90rpx;
		overflow: hidden;
	}
	
	.currency-symbol {
		font-size: 28rpx;
		color: #333;
		padding: 0 16rpx;
	}
	
	.price-input {
		flex: 1;
		height: 90rpx;
		background-color: transparent;
		border: none;
		font-size: 28rpx;
		color: #333;
	}
	
	.unit-picker {
		width: 180rpx;
		height: 90rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20rpx;
		border-left: 1px solid #e5e7eb;
		background-color: #f3f4f6;
	}
	
	.unit-text {
		font-size: 28rpx;
		color: #333;
	}
	
	.dropdown-icon {
		width: 24rpx;
		height: 24rpx;
	}
	
	.duration-input-container {
		display: flex;
		align-items: center;
	}
	
	.duration-input {
		flex: 1;
		height: 90rpx;
		background-color: #f9fafb;
		border: 1px solid #e5e7eb;
		border-radius: 12rpx 0 0 12rpx;
		padding: 0 24rpx;
		font-size: 28rpx;
		color: #333;
	}
	
	.duration-picker {
		width: 180rpx;
		height: 90rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20rpx;
		border: 1px solid #e5e7eb;
		border-left: none;
		background-color: #f3f4f6;
		border-radius: 0 12rpx 12rpx 0;
	}
	
	.form-textarea {
		width: 100%;
		height: 240rpx;
		background-color: #f9fafb;
		border: 1px solid #e5e7eb;
		border-radius: 12rpx;
		padding: 24rpx;
		font-size: 28rpx;
		color: #333;
	}
	
	.text-counter {
		font-size: 24rpx;
		color: #999;
		text-align: right;
		display: block;
		margin-top: 8rpx;
	}
	
	.qualification-list {
		width: 100%;
	}
	
	.qualification-item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		background-color: #f9fafb;
		border: 1px solid #e5e7eb;
		border-radius: 12rpx;
		padding: 24rpx;
		margin-bottom: 20rpx;
	}
	
	.qual-info {
		display: flex;
		align-items: center;
		flex: 1;
	}
	
	.qual-icon {
		width: 48rpx;
		height: 48rpx;
		margin-right: 16rpx;
	}
	
	.qual-content {
		flex: 1;
	}
	
	.qual-name {
		font-size: 28rpx;
		color: #333;
		margin-bottom: 8rpx;
		word-break: break-all;
	}
	
	.qual-size {
		font-size: 24rpx;
		color: #999;
	}
	
	.delete-btn {
		width: 60rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.delete-icon {
		width: 36rpx;
		height: 36rpx;
	}
	
	.upload-btn {
		width: 100%;
		height: 100rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #f3f4f6;
		border: 1px dashed #d1d5db;
		border-radius: 12rpx;
		font-size: 28rpx;
		color: #666;
	}
	
	.upload-icon {
		width: 36rpx;
		height: 36rpx;
		margin-right: 12rpx;
	}
	
	.agreement-box {
		display: flex;
		align-items: flex-start;
		margin: 40rpx 0;
	}
	
	.agreement-text {
		font-size: 26rpx;
		color: #666;
		line-height: 1.6;
		margin-left: 8rpx;
	}
	
	.link-text {
		color: #1d4ed8;
	}
	
	.bottom-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		height: 120rpx;
		background-color: #fff;
		border-top: 1px solid #f0f0f0;
		display: flex;
		align-items: center;
		padding: 0 30rpx;
		z-index: 10;
	}
	
	.save-draft-btn {
		width: 220rpx;
		height: 88rpx;
		background-color: #f3f4f6;
		color: #666;
		font-size: 28rpx;
		border-radius: 44rpx;
		margin-right: 20rpx;
	}
	
	.submit-btn {
		flex: 1;
		height: 88rpx;
		background-color: #1d4ed8;
		color: #fff;
		font-size: 32rpx;
		font-weight: 600;
		border-radius: 44rpx;
	}
	
	.submit-btn[disabled] {
		background-color: #a0aec0;
		color: #fff;
	}
</style> 